#Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=libxvmc
pkgver=1.0.12
pkgrel=3
pkgdesc="X11 Video Motion Compensation extension library"
arch=('x86_64')
url="https://xorg.freedesktop.org/"
license=('custom')
depends=('libxext')
makedepends=('pkgconfig' 'libxv')
source=(${url}/releases/individual/lib/libXvMC-${pkgver}.tar.bz2{,.sig})
sha512sums=('62cb9a72b20af3b081d2d555a253b0e2b8b26b31f4fad10bd3e53bbf96e1663b61bd8df2b78b16f18218cd37cce0c9e6809ae16ded226b37a8b199e41b223955'
            'SKIP')
validpgpkeys=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') #  Alan Coopersmith <alan.coopersmith@oracle.com>
validpgpkeys+=('C41C985FDCF1E5364576638B687393EE37D128F8') # Matthieu Herrb <matthieu.herrb@laas.fr>
validpgpkeys+=('995ED5C8A6138EB0961F18474C09DD83CAAA50B2') # "Adam Jackson <ajax@nwnk.net>"

build() {
  cd libXvMC-${pkgver}
  ./configure --prefix=/usr --sysconfdir=/etc --disable-static
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd libXvMC-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
}
